#!/bin/bash

while :
do
	read -p "please input a numbre:" num1
	echo $num1|egrep [0-9]+ &>/dev/null
	if (( $? == 0 ))
	then 
		if (( $num1 >= 0 && $num1 <= 100 ))
		then
			if (( $num1 >= 90 && $num1 <= 100 ))
			then
				echo -e "\e[32mgood job，may be you can try join alibaba\e[0m"
				break
			elif (( $num1 >= 80 && $num1 <= 89 ))
			then
				echo -e "\e[32mnice，may be you can try join tencent\e[32m"
				break
			elif (( $num1 >= 60 && $num1 <= 79 ))
			then
				echo -e "\e[32mcome on，baby!may be you can try join facebook\e[0m"
				break
			else
				echo -e "\e[32mkeep on fighting，may be you can try join google\e[0m"
				break
			fi
		else
			echo -e "\e[31mplease input 0-100 number\e[0m"
		fi
	else
		echo -e "\e[31mplease input 0-100 number\e[0m"
	fi
done
